/**
 * Created by sfr on 2017/10/10.
 */
import React from "react";
import { routerRedux } from 'dva/router';
import {connect} from "dva";
import moment from 'moment';
import {Tabs, Flex, List, WhiteSpace, Icon, Button} from "antd-mobile";
import styles from './mySetUp.less'
const empty = require('is-empty');

class MySetUp extends React.Component {
  constructor(props) {
    super(props);
    this.state = {
    };
  }
  //==生命周期--页面渲染
  render() {
    return (
      <div className='mySetUp'>
				<div className={styles.emblemBox}>
          <div className={styles.emblemImgBox}>
            <div className={styles.emblemImg}>
              <Icon type={require('../../../../svgs/mine/mySetUp/emblem.svg')} size='lg' color='#f8c400' className={styles.emblemIcon}/>
            </div>
            <div className={styles.emblemTitle}>
              重庆机场集团党建平台
            </div>
          </div>
        </div>
        <List>
          <List.Item arrow="horizontal" onClick={this.handleIntegralRule}>积分规则</List.Item>
          <List.Item arrow="horizontal" onClick={this.handleUseGuide}>使用指南</List.Item>
          <WhiteSpace style={{backgroundColor: '#eee'}}/>
          <WhiteSpace style={{backgroundColor: '#eee'}}/>
          <List.Item arrow="horizontal" onClick={this.handleFeedback}>意见反馈</List.Item>
          <List.Item arrow="horizontal" onClick={this.handleAboutUs}>关于我们</List.Item>
        </List>
        <div className={styles.footerBox}>
          <div className={styles.footerBtn}>
            <Button >退出登录</Button>
          </div>
          <div className={styles.footerText}>
            <span>版本号V1.0.0</span>
            <span style={{marginLeft: '0.3rem'}}>技术支持：重庆慧谷科技</span>
          </div>
        </div>
      </div>
    );
	}
  //==组件所有函数
  //点击积分规则
  handleIntegralRule = () => {
    this.props.dispatch(
      routerRedux.push({
        pathname: `/selfinfo/integralrule`,
        query: {}
      })
    );
  }
  //点击使用指南
  handleUseGuide = () => {
    this.props.dispatch(
      routerRedux.push({
        pathname: `/selfinfo/useGuide`,
        query: {}
      })
    );
  }
  //点击意见反馈
  handleFeedback = () => {
    this.props.dispatch(
      routerRedux.push({
        pathname: `/selfinfo/feedback`,
        query: {}
      })
    );
  }
  //点击关于我们
  handleAboutUs = () => {
    this.props.dispatch(
      routerRedux.push({
        pathname: `/selfinfo/aboutUs`,
        query: {}
      })
    );
  }
}

function mapStateToProps({ information }){
  return {
    information
	};
}
export default connect(mapStateToProps)(MySetUp);


